-
Notifications
You must be signed in to change notification settings - Fork 59
Unable to set a conditional breakpoint in a method with a parameter using generic extends X #694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
using generic extends X Fix eclipse-jdt#693
|
@RoiSoleil : the test fails: |
|
To fix this test fail i need to specify the generic method type in RemoteEvaluatorBuilder#build but there is no API on IEvaluationContext to do so. Could you take a look because i'm not sure i can handle it ... |
| */ | ||
| if (genericSignature.startsWith(String.valueOf(Signature.C_TYPE_VARIABLE)) || genericSignature.startsWith(String.valueOf(Signature.C_CAPTURE)) | ||
| if (genericSignature.startsWith(String.valueOf(Signature.C_TYPE_VARIABLE))) { | ||
| fixedSignature.append(genericSignature.substring(String.valueOf(Signature.C_TYPE_VARIABLE).length(), genericSignature.length() - 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you provide the value you get in the generic signature with your test case which you provided this fix for ?
The idea of the original fix was to avoid using generic types like in the failing test scenario since we are unable to resolve them in debugger context. The reason is we are unable to parse the snippet in such a way where we can resolve generics. So now with this fix, it seems the snippet might be ending up with a generic type which was not replaced, if you can debug the final snippet after applying the |
|
@RoiSoleil thanks for coming up with a PR, it is really appreciated the time you put into coming up with this fix. |
|
In SourceBasedSourceGenerator#adddTypeParameters we deal with type parameter so it works for normal breakpoint but in CodeSnippetToCuMapper we cannot specify type parameters so it fails ... |
Fix #693